This file is used to analyse the ORS + IFE basal dataset.
library(dplyr)
library(patchwork)
library(ggplot2)
library(ComplexHeatmap)
.libPaths()
## [1] "/usr/local/lib/R/library"
In this section, we set the global settings of the analysis. We will store data there :
save_name = "ors_ifeb"
out_dir = "."
We load the dataset :
sobj = readRDS(paste0(out_dir, "/", save_name, "_sobj.rds"))
sobj
## An object of class Seurat
## 16683 features across 3416 samples within 1 assay
## Active assay: RNA (16683 features, 2000 variable features)
## 6 dimensional reductions calculated: RNA_pca, RNA_pca_20_tsne, RNA_pca_20_umap, harmony, harmony_20_umap, harmony_20_tsne
We load the sample information :
sample_info = readRDS(paste0(out_dir, "/../../1_metadata/hs_hd_sample_info.rds"))
project_names_oi = sample_info$project_name
graphics::pie(rep(1, nrow(sample_info)),
col = sample_info$color,
labels = sample_info$project_name)
Here are custom colors for each cell type :
color_markers = readRDS(paste0(out_dir, "/../../1_metadata/hs_hd_color_markers.rds"))
data.frame(cell_type = names(color_markers),
color = unlist(color_markers)) %>%
ggplot2::ggplot(., aes(x = cell_type, y = 0, fill = cell_type)) +
ggplot2::geom_point(pch = 21, size = 5) +
ggplot2::scale_fill_manual(values = unlist(color_markers), breaks = names(color_markers)) +
ggplot2::theme_classic() +
ggplot2::theme(legend.position = "none",
axis.line = element_blank(),
axis.title = element_blank(),
axis.ticks = element_blank(),
axis.text.y = element_blank(),
axis.text.x = element_text(angle = 30, hjust = 1))
This is the projection of interest :
name2D = "harmony_20_tsne"
We design a custom function to make the GSEA plot and a word cloud graph :
make_gsea_plot = function(gsea_results, gs_oi, fold_change, metric = "FC") {
fold_change$metric = fold_change[, metric]
plot_list = lapply(gs_oi, FUN = function(gene_set) {
# Gene set content
gs_content = gene_sets %>%
dplyr::filter(gs_name == gene_set) %>%
dplyr::pull(ensembl_gene) %>%
unique()
# Gene set size
nb_genes = length(gs_content)
# Enrichment metrics
NES = gsea_results@result[gene_set, "NES"]
p.adjust = gsea_results@result[gene_set, "p.adjust"] %>%
round(., 4)
qvalues = gsea_results@result[gene_set, "qvalues"]
if (p.adjust > 0.05) {
p.adjust = paste0("<span style='color:red;'>", p.adjust, "</span>")
}
my_subtitle = paste0("\nNES : ", round(NES, 2),
" | padj : ", p.adjust,
" | qval : ", round(qvalues, 4),
" | set size : ", nb_genes, " genes")
# Size limits
lower_FC = min(fold_change[gs_content, ]$metric, na.rm = TRUE)
upper_FC = max(fold_change[gs_content, ]$metric, na.rm = TRUE)
# Plot
p = enrichplot::gseaplot2(x = gsea_results, geneSetID = gene_set) +
ggplot2::labs(title = gene_set,
subtitle = my_subtitle) +
ggplot2::theme(plot.title = element_text(hjust = 0.5, face = "bold",
margin = ggplot2::margin(3, 3, 5, 3)),
plot.subtitle = ggtext::element_markdown(hjust = 0.5,
size = 10))
wc = ggplot2::ggplot(fold_change[gs_content, ],
aes(label = gene_name, size = abs(metric), color = metric)) +
ggwordcloud::geom_text_wordcloud_area(show.legend = TRUE) +
ggplot2::scale_color_gradient2(
name = metric,
low = aquarius::color_cnv[1],
mid = "gray70", midpoint = 0,
high = aquarius::color_cnv[3]) +
ggplot2::scale_size_area(max_size = 7) +
ggplot2::theme_minimal() +
ggplot2::guides(size = "none")
return(list(p, wc))
}) %>% unlist(., recursive = FALSE)
return(plot_list)
}
We visualize gene expression for some markers :
features = c("percent.mt", "percent.rb", "nFeature_RNA")
plot_list = lapply(features, FUN = function(one_gene) {
Seurat::FeaturePlot(sobj, features = one_gene,
reduction = name2D) +
ggplot2::theme(aspect.ratio = 1) +
ggplot2::scale_color_gradientn(colors = aquarius::color_gene) +
Seurat::NoAxes()
})
patchwork::wrap_plots(plot_list, ncol = 3)
We visualize clusters :
cluster_plot = Seurat::DimPlot(sobj, reduction = name2D, label = TRUE) +
Seurat::NoAxes() +
ggplot2::theme(aspect.ratio = 1)
cluster_plot
We visualize cell type split by sample :
plot_list = aquarius::plot_split_dimred(sobj,
reduction = name2D,
split_by = "project_name",
group_by = "cell_type",
split_color = setNames(sample_info$color,
nm = sample_info$project_name),
group_color = color_markers,
bg_pt_size = 0.5, main_pt_size = 0.5)
plot_list[[length(plot_list) + 1]] = cluster_plot
patchwork::wrap_plots(plot_list, ncol = 4) &
Seurat::NoLegend()
We summarize major cell type by cluster :
cell_type_clusters = sobj@meta.data[, c("cell_type", "seurat_clusters")] %>%
table() %>%
prop.table(., margin = 2) %>%
apply(., 2, which.max)
cell_type_clusters = setNames(levels(sobj$cell_type)[cell_type_clusters],
nm = names(cell_type_clusters))
We define cluster type :
sobj$cluster_type = cell_type_clusters[sobj$seurat_clusters] %>%
as.factor()
table(sobj$cluster_type, sobj$cell_type)
##
## CD4 T cells CD8 T cells Langerhans cells macrophages B cells
## IFE basal 0 0 0 0 1
## ORS 0 0 0 0 0
##
## cuticle cortex medulla IRS proliferative HF-SCs IFE basal
## IFE basal 1 0 4 1 16 41 1745
## ORS 2 0 1 0 8 17 4
##
## IFE granular spinous ORS sebocytes
## IFE basal 60 29 16
## ORS 12 1454 4
We subset color_markers :
color_markers = color_markers[levels(sobj$cluster_type)]
We compare cluster annotation and cell type annotation :
p1 = Seurat::DimPlot(sobj, group.by = "cell_type",
reduction = name2D, cols = color_markers) +
ggplot2::labs(title = "Cell type") +
Seurat::NoAxes() +
ggplot2::theme(aspect.ratio = 1,
plot.title = element_text(hjust = 0.5))
p2 = Seurat::DimPlot(sobj, group.by = "cluster_type",
reduction = name2D, cols = color_markers) +
ggplot2::labs(title = "Cluster type") +
Seurat::NoAxes() +
ggplot2::theme(aspect.ratio = 1,
plot.title = element_text(hjust = 0.5))
patchwork::wrap_plots(p1, p2, guides = "collect")
We make a barplot to compare ORS and IFE basal populations in HS vs HD samples. The proportion of ORS is indicated on top of bars.
quantif = table(sobj$sample_identifier,
sobj$cluster_type) %>%
as.data.frame.table() %>%
`colnames<-`(c("Sample", "cell_type", "nb_cells")) %>%
dplyr::group_by(Sample) %>%
dplyr::mutate(total_cells = sum(nb_cells)) %>%
as.data.frame() %>%
dplyr::filter(cell_type == "ORS") %>%
dplyr::mutate(prop_ibl = nb_cells / total_cells) %>%
dplyr::mutate(prop_ibl = 100*round(prop_ibl, 4))
sobj$seurat_clusters = factor(sobj$seurat_clusters,
levels = names(sort(cell_type_clusters)))
aquarius::plot_barplot(df = table(sobj$sample_identifier,
sobj$seurat_clusters) %>%
as.data.frame.table() %>%
`colnames<-`(c("sample_identifier", "clusters", "nb_cells")),
x = "sample_identifier", y = "nb_cells", fill = "clusters",
position = position_fill()) +
ggplot2::scale_fill_manual(values = c(colorRampPalette(c("royalblue1", "royalblue4"))(table(sort(cell_type_clusters))["IFE basal"]),
colorRampPalette(c("chartreuse1", "chartreuse4"))(table(sort(cell_type_clusters))["ORS"])),
breaks = names(sort(cell_type_clusters)),
name = "Cell type") +
ggplot2::geom_label(data = quantif, inherit.aes = FALSE,
aes(x = .data$Sample, y = 1.05, label = .data$prop_ibl),
label.size = 0, size = 5)
In this section, we perform DE between :
We save the results in a list :
list_results = list()
We make over-representation analysis for each group of genes. We load gene sets from MSigDB :
gene_sets = aquarius::get_gene_sets(species = "Homo sapiens")
gene_sets = gene_sets$gene_sets
head(gene_sets)
## # A tibble: 6 x 16
## gs_cat gs_subcat gs_name gene_symbol entrez_gene ensembl_gene human_gene_symb~
## <chr> <chr> <chr> <chr> <int> <chr> <chr>
## 1 C5 GO:BP GOBP_1~ AASDHPPT 60496 ENSG0000014~ AASDHPPT
## 2 C5 GO:BP GOBP_1~ ALDH1L1 10840 ENSG0000014~ ALDH1L1
## 3 C5 GO:BP GOBP_1~ ALDH1L2 160428 ENSG0000013~ ALDH1L2
## 4 C5 GO:BP GOBP_1~ MTHFD1 4522 ENSG0000010~ MTHFD1
## 5 C5 GO:BP GOBP_1~ MTHFD1L 25902 ENSG0000012~ MTHFD1L
## 6 C5 GO:BP GOBP_1~ MTHFD2L 441024 ENSG0000016~ MTHFD2L
## # ... with 9 more variables: human_entrez_gene <int>, human_ensembl_gene <chr>,
## # gs_id <chr>, gs_pmid <chr>, gs_geoid <chr>, gs_exact_source <chr>,
## # gs_url <chr>, gs_description <chr>, category <chr>
How many gene sets ?
gene_sets[, c("gs_subcat", "gs_name")] %>%
dplyr::distinct() %>%
dplyr::pull(gs_subcat) %>%
table() %>%
as.data.frame.table() %>%
`colnames<-`(c("Category", "Nb gene sets"))
## Category Nb gene sets
## 1 50
## 2 CP:KEGG 186
## 3 CP:PID 196
## 4 CP:REACTOME 1615
## 5 CP:WIKIPATHWAYS 664
## 6 GO:BP 7658
## 7 GO:CC 1006
## 8 GO:MF 1738
We get gene name and gene ID correspondence :
gene_corresp = sobj@assays[["RNA"]]@meta.features[, c("gene_name", "Ensembl_ID")] %>%
`colnames<-`(c("NAME", "ID")) %>%
dplyr::mutate(ID = as.character(ID))
rownames(gene_corresp) = gene_corresp$ID
head(gene_corresp)
## NAME ID
## ENSG00000238009 AL627309.1 ENSG00000238009
## ENSG00000237491 AL669831.5 ENSG00000237491
## ENSG00000225880 LINC00115 ENSG00000225880
## ENSG00000230368 FAM41C ENSG00000230368
## ENSG00000230699 AL645608.3 ENSG00000230699
## ENSG00000187634 SAMD11 ENSG00000187634
group_name = "ORS_vs_IFE_basal"
We change cell identities to cluster type :
Seurat::Idents(sobj) = sobj$cluster_type
table(Seurat::Idents(sobj), sobj$sample_type)
##
## HS HD
## IFE basal 1480 434
## ORS 1273 229
We identify specific markers for each population :
mark = Seurat::FindMarkers(sobj, ident.1 = "ORS", ident.2 = "IFE basal")
mark = mark %>%
dplyr::filter(p_val_adj < 0.05) %>%
dplyr::arrange(-avg_logFC, pct.1 - pct.2)
list_results[[group_name]]$mark = mark
dim(mark)
## [1] 1020 5
head(mark, n = 20)
## p_val avg_logFC pct.1 pct.2 p_val_adj
## KRT16 0.000000e+00 4.309131 0.921 0.118 0.000000e+00
## KRT6B 0.000000e+00 3.656597 0.923 0.293 0.000000e+00
## FABP5 0.000000e+00 3.565441 0.993 0.498 0.000000e+00
## KRT6A 3.240362e-159 3.061127 0.774 0.485 5.405896e-155
## KRT17 0.000000e+00 3.035906 0.989 0.750 0.000000e+00
## CST6 5.331855e-159 2.836067 0.398 0.037 8.895133e-155
## KRT6C 1.618794e-265 2.621388 0.571 0.044 2.700635e-261
## TMSB4X 0.000000e+00 2.393617 0.992 0.878 0.000000e+00
## LGALS1 0.000000e+00 2.355597 0.923 0.486 0.000000e+00
## S100A2 0.000000e+00 2.104855 0.995 0.991 0.000000e+00
## CALML3 0.000000e+00 2.010035 0.972 0.704 0.000000e+00
## GJA1 0.000000e+00 1.956189 0.872 0.607 0.000000e+00
## GJB6 0.000000e+00 1.835009 0.913 0.690 0.000000e+00
## SBSN 7.327194e-244 1.831239 0.543 0.043 1.222396e-239
## APOE 0.000000e+00 1.745727 0.983 0.790 0.000000e+00
## NDUFA4L2 9.107385e-221 1.700887 0.693 0.231 1.519385e-216
## LYPD3 0.000000e+00 1.672332 0.742 0.143 0.000000e+00
## TUBB2A 0.000000e+00 1.661309 0.760 0.191 0.000000e+00
## SDC1 8.945403e-297 1.650168 0.838 0.542 1.492362e-292
## HSPB1 0.000000e+00 1.614432 0.990 0.967 0.000000e+00
There are 1020 genes differentially expressed. How many for each population ?
# ORS
mark_ibl = mark %>%
dplyr::filter(avg_logFC > 0)
nrow(mark_ibl)
## [1] 415
# IFE basal
mark_ors = mark %>%
dplyr::filter(avg_logFC < 0)
nrow(mark_ors)
## [1] 605
We represent the information on a figure :
mark$gene_name = rownames(mark)
mark_to_label = rbind(
# up-regulated in ORS
mark %>% dplyr::top_n(., n = 20, wt = avg_logFC),
# up-regulated in IFE basal
mark %>% dplyr::top_n(., n = 20, wt = -avg_logFC),
# representative and selective for ORS
mark %>% dplyr::top_n(., n = 20, wt = (pct.1 - pct.2)),
# representative and selective for IFE basal
mark %>% dplyr::top_n(., n = 20, wt = -(pct.1 - pct.2))) %>%
dplyr::distinct()
ggplot2::ggplot(mark, aes(x = pct.1, y = pct.2, col = avg_logFC)) +
ggplot2::geom_abline(slope = 1, intercept = 0, lty = 2) +
ggplot2::geom_point() +
ggrepel::geom_label_repel(data = mark_to_label, max.overlaps = Inf,
aes(x = pct.1, y = pct.2, label = gene_name),
col = "black", fill = NA, size = 3, label.size = NA) +
ggplot2::labs(title = "Differentially expressed genes",
subtitle = "between ORS and IFE basal") +
ggplot2::scale_color_gradient2(low = aquarius::color_cnv[1],
mid = aquarius::color_cnv[2],
high = aquarius::color_cnv[3],
midpoint = 0) +
ggplot2::theme_classic() +
ggplot2::theme(plot.title = element_text(hjust = 0.5),
plot.subtitle = element_text(hjust = 0.5))
We represent the best genes on a violin plot, group by cluster type and split by sample type :
mark_to_label = mark_to_label %>%
dplyr::arrange(pct.1 - pct.2)
plot_list = lapply(mark_to_label$gene_name, FUN = function(gene) {
p = Seurat::VlnPlot(sobj, features = gene, pt.size = 0.001,
group.by = "cluster_type",
split.by = "sample_type") +
ggplot2::scale_fill_manual(breaks = c("HS", "HD"),
values = c("#C55F40", "#2C78E6")) +
ggplot2::theme(axis.title.x = element_blank(),
axis.title.y = element_blank(),
legend.position = "none")
return(p)
})
patchwork::wrap_plots(plot_list, ncol = 5)
On the figure, we can see that some specific markers for a population are indeed specific to a sample type rather than the whole population.
We explore enrichment in gene sets for ORS population
genes_of_interest = rownames(mark_ibl)
enrichr_results = aquarius::run_enrichr(gene_names = genes_of_interest,
gene_corresp = gene_corresp,
gene_sets = gene_sets[, c("gs_name", "ensembl_gene")],
make_plot = TRUE,
plot_title = "Up-regulated in ORS compared to IFE basal")
list_results[[group_name]]$enrichr_ibl = enrichr_results$ego
enrichr_results$plot +
ggplot2::theme(axis.text.y = element_text(size = 8))
We explore enrichment in gene sets for IFE basal population.
genes_of_interest = rownames(mark_ors)
enrichr_results = aquarius::run_enrichr(gene_names = genes_of_interest,
gene_corresp = gene_corresp,
gene_sets = gene_sets[, c("gs_name", "ensembl_gene")],
make_plot = TRUE,
plot_title = "Up-regulated in IFE basal compared to ORS")
list_results[[group_name]]$enrichr_ors = enrichr_results$ego
enrichr_results$plot +
ggplot2::theme(axis.text.y = element_text(size = 8))
We run a GSEA for all gene sets, from the full count matrix :
ranked_gene_list = aquarius::run_foldchange(Seurat::GetAssayData(sobj, assay = "RNA", slot = "counts"),
group1 = colnames(sobj)[sobj@active.ident %in% "ORS"],
group2 = colnames(sobj)[sobj@active.ident %in% "IFE basal"])
names(ranked_gene_list) = gene_corresp$ID
gsea_results = aquarius::gsea_run(ranked_gene_list = ranked_gene_list,
gene_sets = gene_sets[, c("gs_name", "ensembl_gene")],
GSEA_p_val_thresh = 1)
list_results[[group_name]]$gsea = gsea_results
gsea_results@result %>%
dplyr::filter(pvalue < 0.05) %>%
dplyr::top_n(., n = 200, wt = abs(NES)) %>%
dplyr::mutate(too_long = ifelse(nchar(ID) > 60, yes = TRUE, no = FALSE)) %>%
dplyr::mutate(ID = stringr::str_sub(ID, end = 60)) %>%
dplyr::mutate(ID = ifelse(too_long, yes = paste0(ID, "..."), no = ID)) %>%
aquarius::gsea_plot(show_legend = TRUE) +
ggplot2::labs(title = "GSEA using all genes (count matrix)") +
ggplot2::theme(plot.title = element_text(size = 20))
We make the gsea plot for two gene sets :
p1 = enrichplot::gseaplot2(x = gsea_results, geneSetID = "REACTOME_KERATINIZATION") +
ggplot2::labs(title = "REACTOME_KERATINIZATION") +
ggplot2::theme(plot.title = element_text(hjust = 0.5, face = "bold",
margin = ggplot2::margin(3, 3, 5, 3)))
p2 = enrichplot::gseaplot2(x = gsea_results, geneSetID = "HALLMARK_INTERFERON_GAMMA_RESPONSE") +
ggplot2::labs(title = "HALLMARK_INTERFERON_GAMMA_RESPONSE") +
ggplot2::theme(plot.title = element_text(hjust = 0.5, face = "bold",
margin = ggplot2::margin(3, 3, 5, 3)))
p1 | p2
Maybe those gene sets are specific to sample type rather than the whole cell population.
group_name = "cluster4_vs_IFE basal"
We subset the Seurat object and change cell identities to sample type.
subsobj = subset(sobj, cluster_type == "IFE basal")
subsobj$seurat_clusters = base::droplevels(subsobj$seurat_clusters)
Seurat::Idents(subsobj) = subsobj$seurat_clusters
table(subsobj$seurat_clusters)
##
## 0 2 3 4 10
## 667 430 363 346 108
We identify specific markers for each population :
mark = Seurat::FindMarkers(subsobj, ident.1 = 4)
mark = mark %>%
dplyr::filter(p_val_adj < 0.05) %>%
dplyr::arrange(-avg_logFC, pct.1 - pct.2)
list_results[[group_name]]$mark = mark
dim(mark)
## [1] 380 5
head(mark, n = 20)
## p_val avg_logFC pct.1 pct.2 p_val_adj
## SLPI 3.255137e-130 1.5256517 0.743 0.160 5.430545e-126
## MT1X 3.820149e-66 1.4018462 0.922 0.700 6.373155e-62
## KRT15 3.317107e-130 1.3213954 1.000 0.902 5.533930e-126
## LY6D 2.225488e-78 1.2305062 0.460 0.078 3.712781e-74
## IFI27 2.254730e-96 1.1549038 0.526 0.081 3.761567e-92
## MT1E 3.852025e-76 1.1401782 0.948 0.672 6.426333e-72
## IGFBP3 1.683129e-119 1.1290859 0.393 0.015 2.807964e-115
## CXCL14 1.260295e-81 1.0964601 0.994 0.846 2.102550e-77
## WNT3 1.472048e-209 1.0518440 0.890 0.128 2.455818e-205
## AQP3 1.223832e-78 0.9765986 0.957 0.763 2.041720e-74
## IL1R2 9.284308e-129 0.9476709 0.659 0.103 1.548901e-124
## TSC22D3 2.182105e-70 0.9196802 0.708 0.263 3.640406e-66
## NEAT1 1.132711e-43 0.8746776 0.980 0.944 1.889702e-39
## MT2A 8.775261e-28 0.8724487 0.983 0.876 1.463977e-23
## MTRNR2L1 2.478891e-24 0.8503250 0.783 0.621 4.135533e-20
## ZFP36 3.636528e-34 0.8387802 0.702 0.429 6.066820e-30
## GLUL 7.288508e-51 0.8327581 0.908 0.736 1.215942e-46
## ID1 1.124799e-12 0.8121904 0.624 0.466 1.876502e-08
## IL18 7.785633e-97 0.8100874 0.942 0.476 1.298877e-92
## HOPX 1.782476e-68 0.7958538 0.832 0.434 2.973705e-64
There are 380 genes differentially expressed. How many for each population ?
# cluster 4
mark_cluster4 = mark %>%
dplyr::filter(avg_logFC > 0)
nrow(mark_cluster4)
## [1] 209
# Other IFE basal
mark_not5 = mark %>%
dplyr::filter(avg_logFC < 0)
nrow(mark_not5)
## [1] 171
We represent the information on a figure :
mark$gene_name = rownames(mark)
mark_signif = rbind(
# up-regulated in cluster 4
mark %>% dplyr::top_n(., n = 20, wt = avg_logFC),
# up-regulated in other IFE basal
mark %>% dplyr::top_n(., n = 20, wt = -avg_logFC),
# representative and selective for cluster 4
mark %>% dplyr::top_n(., n = 20, wt = (pct.1 - pct.2)),
# representative and selective for other IFE basal
mark %>% dplyr::top_n(., n = 20, wt = -(pct.1 - pct.2))) %>%
dplyr::distinct()
ggplot2::ggplot(mark, aes(x = pct.1, y = pct.2, col = avg_logFC)) +
ggplot2::geom_abline(slope = 1, intercept = 0, lty = 2) +
ggplot2::geom_point() +
ggrepel::geom_label_repel(data = mark_signif, max.overlaps = Inf,
aes(x = pct.1, y = pct.2, label = gene_name),
col = "black", fill = NA, size = 3, label.size = NA) +
ggplot2::labs(title = "Differentially expressed genes",
subtitle = "between cluster 4 and other IFE basal") +
ggplot2::scale_color_gradient2(low = aquarius::color_cnv[1],
mid = aquarius::color_cnv[2],
high = aquarius::color_cnv[3],
midpoint = 0) +
ggplot2::theme_classic() +
ggplot2::theme(plot.title = element_text(hjust = 0.5),
plot.subtitle = element_text(hjust = 0.5))
We represent a subset of genes on a heatmap :
features_oi = mark %>%
dplyr::filter(p_val_adj < 0.05) %>%
dplyr::filter(abs(avg_logFC) > 0.5) %>%
rownames()
length(features_oi)
## [1] 103
We prepare the scaled expression matrix :
mat_expression = Seurat::GetAssayData(subsobj, assay = "RNA", slot = "data")[features_oi, ]
mat_expression = Matrix::t(mat_expression)
mat_expression = dynutils::scale_quantile(mat_expression) # between 0 and 1
mat_expression = Matrix::t(mat_expression)
mat_expression = as.matrix(mat_expression) # not sparse
dim(mat_expression)
## [1] 103 1914
We prepare the heatmap annotation :
ha_top = ComplexHeatmap::HeatmapAnnotation(
cluster_type = subsobj$cluster_type,
sample_type = subsobj$sample_type,
cluster = subsobj$seurat_clusters,
col = list(cluster_type = color_markers,
sample_type = setNames(nm = c("HS", "HD"),
c("#C55F40", "#2C78E6")),
cluster = setNames(nm = levels(subsobj$seurat_clusters),
aquarius::gg_color_hue(length(levels(subsobj$seurat_clusters))))))
And the heatmap :
ht = ComplexHeatmap::Heatmap(mat_expression,
col = aquarius::color_cnv,
# Annotation
top_annotation = ha_top,
# Grouping
column_title = NULL,
cluster_rows = TRUE,
cluster_columns = TRUE,
show_column_names = FALSE,
# Visual aspect
show_heatmap_legend = TRUE,
border = TRUE)
ComplexHeatmap::draw(ht,
merge_legend = TRUE,
heatmap_legend_side = "bottom",
annotation_legend_side = "bottom")
We explore enrichment in gene sets for cluster 4.
genes_of_interest = rownames(mark_cluster4)
enrichr_results = aquarius::run_enrichr(gene_names = genes_of_interest,
gene_corresp = gene_corresp,
gene_sets = gene_sets[, c("gs_name", "ensembl_gene")],
make_plot = TRUE,
plot_title = "Up-regulated in cluster 4 compared to other IFE basal")
list_results[[group_name]]$enrichr_up = enrichr_results$ego
enrichr_results$plot +
ggplot2::theme(axis.text.y = element_text(size = 8))
We explore enrichment in gene sets for genes downregulated in cluster 4.
genes_of_interest = rownames(mark_not5)
enrichr_results = aquarius::run_enrichr(gene_names = genes_of_interest,
gene_corresp = gene_corresp,
gene_sets = gene_sets[, c("gs_name", "ensembl_gene")],
make_plot = TRUE,
plot_title = "Down-regulated in cluster 4 compared to other IFE basal")
list_results[[group_name]]$enrichr_dn = enrichr_results$ego
enrichr_results$plot +
ggplot2::theme(axis.text.y = element_text(size = 8))
We run a GSEA for all gene sets, from the full count matrix :
ranked_gene_list = aquarius::run_foldchange(Seurat::GetAssayData(subsobj, assay = "RNA", slot = "counts"),
group1 = colnames(subsobj)[subsobj@active.ident == 5],
group2 = colnames(subsobj)[subsobj@active.ident != 5])
names(ranked_gene_list) = gene_corresp$ID
gsea_results = aquarius::gsea_run(ranked_gene_list = ranked_gene_list,
gene_sets = gene_sets[, c("gs_name", "ensembl_gene")],
GSEA_p_val_thresh = 1)
list_results[[group_name]]$gsea = gsea_results
gsea_results@result %>%
dplyr::filter(pvalue < 0.05) %>%
dplyr::top_n(., n = 200, wt = abs(NES)) %>%
dplyr::mutate(too_long = ifelse(nchar(ID) > 60, yes = TRUE, no = FALSE)) %>%
dplyr::mutate(ID = stringr::str_sub(ID, end = 60)) %>%
dplyr::mutate(ID = ifelse(too_long, yes = paste0(ID, "..."), no = ID)) %>%
aquarius::gsea_plot(show_legend = TRUE) +
ggplot2::labs(title = "GSEA using all genes (count matrix)") +
ggplot2::theme(plot.title = element_text(size = 20))
We compute a fold change table to make a wordcloud :
fold_change = gene_corresp
colnames(fold_change) = c("gene_name", "ID")
rownames(fold_change) = fold_change$ID
fold_change$FC = ranked_gene_list[rownames(fold_change)]
fold_change$pct.1 = Seurat::GetAssayData(subsobj, assay = "RNA", slot = "counts")[, subsobj@active.ident == "5"] %>%
apply(., MARGIN = 1, FUN = function(one_row) {
return( mean(one_row != 0) )
})
fold_change$pct.2 = Seurat::GetAssayData(subsobj, assay = "RNA", slot = "counts")[, subsobj@active.ident != "5"] %>%
apply(., MARGIN = 1, FUN = function(one_row) {
return( mean(one_row != 0) )
})
fold_change$FC_x_pct = ifelse(fold_change$FC > 0,
yes = fold_change$FC * fold_change$pct.1,
no = fold_change$FC * fold_change$pct.2)
dim(fold_change) ; head(fold_change)
## [1] 16683 6
## gene_name ID FC pct.1 pct.2 FC_x_pct
## ENSG00000238009 AL627309.1 ENSG00000238009 7.616614 NaN 0.005224660 NaN
## ENSG00000237491 AL669831.5 ENSG00000237491 3.675166 NaN 0.075757576 NaN
## ENSG00000225880 LINC00115 ENSG00000225880 4.847226 NaN 0.037617555 NaN
## ENSG00000230368 FAM41C ENSG00000230368 4.053677 NaN 0.063218391 NaN
## ENSG00000230699 AL645608.3 ENSG00000230699 7.268690 NaN 0.006792059 NaN
## ENSG00000187634 SAMD11 ENSG00000187634 8.268690 NaN 0.003134796 NaN
We make the gsea plot for some gene sets :
gs_oi = c("GOBP_CD4_POSITIVE_ALPHA_BETA_T_CELL_DIFFERENTIATION",
"GOBP_REGULATION_OF_ALPHA_BETA_T_CELL_DIFFERENTIATION",
"GOBP_ALPHA_BETA_T_CELL_DIFFERENTIATION",
"GOBP_POSITIVE_REGULATION_OF_ALPHA_BETA_T_CELL_ACTIVATION",
"GOBP_ALPHA_BETA_T_CELL_ACTIVATION")
plot_list = make_gsea_plot(gsea_results, gs_oi, fold_change, "FC_x_pct")
patchwork::wrap_plots(plot_list, ncol = 2, widths = c(2,1.5))
group_name = "ORS_HS_vs_HD"
We subset the Seurat object and change cell identities to sample type.
subsobj = subset(sobj, cluster_type == "ORS")
Seurat::Idents(subsobj) = subsobj$sample_type
table(subsobj$sample_type)
##
## HS HD
## 1273 229
We identify DE genes between HS and HD :
mark = Seurat::FindMarkers(subsobj, ident.1 = "HS", ident.2 = "HD")
mark = mark %>%
dplyr::filter(p_val_adj < 0.05) %>%
dplyr::arrange(-avg_logFC, pct.1 - pct.2)
list_results[[group_name]]$mark = mark
dim(mark)
## [1] 113 5
head(mark, n = 20)
## p_val avg_logFC pct.1 pct.2 p_val_adj
## LGALS7 1.233391e-50 1.6382773 0.687 0.188 2.057666e-46
## S100A7 2.238581e-12 1.6315223 0.301 0.079 3.734624e-08
## MIF 2.628565e-45 1.2219076 0.706 0.258 4.385235e-41
## LGALS7B 1.047084e-10 1.1858854 0.776 0.712 1.746850e-06
## MTRNR2L12 9.689280e-12 1.0610589 0.383 0.175 1.616463e-07
## MT-CO1 3.687275e-12 1.0034803 0.440 0.218 6.151481e-08
## MTRNR2L8 1.016248e-11 0.9191119 0.347 0.148 1.695406e-07
## FOSB 2.189561e-09 0.8917793 0.299 0.127 3.652844e-05
## MT-CO2 2.150331e-08 0.8575475 0.423 0.262 3.587398e-04
## S100A9 3.885050e-14 0.8421403 0.321 0.074 6.481429e-10
## NDUFA4L2 2.189998e-21 0.8332238 0.742 0.424 3.653574e-17
## CA2 1.798407e-17 0.6754404 0.464 0.170 3.000282e-13
## ARF5 9.132684e-28 0.6267638 0.435 0.044 1.523606e-23
## MT-ATP6 1.503327e-06 0.6204255 0.487 0.349 2.508001e-02
## MT-ND4 2.221289e-07 0.6035045 0.402 0.240 3.705776e-03
## CKB 3.042386e-08 0.5733551 0.288 0.118 5.075613e-04
## MALAT1 1.510247e-06 0.5431476 0.696 0.572 2.519545e-02
## S100A8 1.745757e-08 0.5268172 0.194 0.039 2.912446e-04
## MCL1 6.046367e-08 0.5068625 0.380 0.205 1.008715e-03
## KRT15 1.756490e-07 0.5054360 0.282 0.118 2.930352e-03
We explore enrichment in gene sets for HS population.
genes_of_interest = mark %>%
dplyr::filter(avg_logFC > 0) %>%
rownames()
enrichr_results = aquarius::run_enrichr(gene_names = genes_of_interest,
gene_corresp = gene_corresp,
gene_sets = gene_sets[, c("gs_name", "ensembl_gene")],
make_plot = TRUE,
plot_title = "Up-regulated in HS compared to HD")
list_results[[group_name]]$enrichr_hs = enrichr_results$ego
enrichr_results$plot +
ggplot2::theme(axis.text.y = element_text(size = 8))
We explore enrichment in gene sets for HD population.
genes_of_interest = mark %>%
dplyr::filter(avg_logFC < 0) %>%
rownames()
enrichr_results = aquarius::run_enrichr(gene_names = genes_of_interest,
gene_corresp = gene_corresp,
gene_sets = gene_sets[, c("gs_name", "ensembl_gene")],
make_plot = TRUE,
plot_title = "Down-regulated in HS compared to HD")
list_results[[group_name]]$enrichr_hd = enrichr_results$ego
enrichr_results$plot +
ggplot2::theme(axis.text.y = element_text(size = 8))
We run a GSEA for all gene sets, from the full count matrix :
ranked_gene_list = aquarius::run_foldchange(Seurat::GetAssayData(subsobj, assay = "RNA", slot = "counts"),
group1 = colnames(subsobj)[subsobj@active.ident %in% "HS"],
group2 = colnames(subsobj)[subsobj@active.ident %in% "HD"])
names(ranked_gene_list) = gene_corresp$ID
gsea_results = aquarius::gsea_run(ranked_gene_list = ranked_gene_list,
gene_sets = gene_sets[, c("gs_name", "ensembl_gene")],
GSEA_p_val_thresh = 1)
list_results[[group_name]]$gsea = gsea_results
gsea_results@result %>%
dplyr::filter(pvalue < 0.05) %>%
dplyr::top_n(., n = 200, wt = abs(NES)) %>%
dplyr::mutate(too_long = ifelse(nchar(ID) > 60, yes = TRUE, no = FALSE)) %>%
dplyr::mutate(ID = stringr::str_sub(ID, end = 60)) %>%
dplyr::mutate(ID = ifelse(too_long, yes = paste0(ID, "..."), no = ID)) %>%
aquarius::gsea_plot(show_legend = TRUE) +
ggplot2::labs(title = "GSEA using all genes (count matrix)") +
ggplot2::theme(plot.title = element_text(size = 20))
We compute a fold change table to make a wordcloud :
fold_change = gene_corresp
colnames(fold_change) = c("gene_name", "ID")
rownames(fold_change) = fold_change$ID
fold_change$FC = ranked_gene_list[rownames(fold_change)]
fold_change$pct.1 = Seurat::GetAssayData(subsobj, assay = "RNA", slot = "counts")[, subsobj@active.ident == "HS"] %>%
apply(., MARGIN = 1, FUN = function(one_row) {
return( mean(one_row != 0) )
})
fold_change$pct.2 = Seurat::GetAssayData(subsobj, assay = "RNA", slot = "counts")[, subsobj@active.ident == "HD"] %>%
apply(., MARGIN = 1, FUN = function(one_row) {
return( mean(one_row != 0) )
})
fold_change$FC_x_pct = ifelse(fold_change$FC > 0,
yes = fold_change$FC * fold_change$pct.1,
no = fold_change$FC * fold_change$pct.2)
dim(fold_change) ; head(fold_change)
## [1] 16683 6
## gene_name ID FC pct.1 pct.2
## ENSG00000238009 AL627309.1 ENSG00000238009 -0.7927899 0.004713276 0.000000000
## ENSG00000237491 AL669831.5 ENSG00000237491 0.1788283 0.092694423 0.039301310
## ENSG00000225880 LINC00115 ENSG00000225880 -1.0151823 0.021209741 0.017467249
## ENSG00000230368 FAM41C ENSG00000230368 1.1002949 0.038491752 0.004366812
## ENSG00000230699 AL645608.3 ENSG00000230699 -0.6001448 0.005498822 0.000000000
## ENSG00000187634 SAMD11 ENSG00000187634 -3.0151823 0.001571092 0.004366812
## FC_x_pct
## ENSG00000238009 0.00000000
## ENSG00000237491 0.01657639
## ENSG00000225880 -0.01773244
## ENSG00000230368 0.04235228
## ENSG00000230699 0.00000000
## ENSG00000187634 -0.01316673
We make the gsea plot for some gene sets :
gs_oi = c("REACTOME_EXPORT_OF_VIRAL_RIBONUCLEOPROTEINS_FROM_NUCLEUS",
"GOBP_MICROTUBULE_ANCHORING",
"GOBP_HISTONE_H3_K4_TRIMETHYLATION",
"GOBP_HISTONE_H3_K4_MONOMETHYLATION",
"GOBP_MITOPHAGY",
"REACTOME_SEROTONIN_NEUROTRANSMITTER_RELEASE_CYCLE",
"REACTOME_DOPAMINE_NEUROTRANSMITTER_RELEASE_CYCLE")
plot_list = make_gsea_plot(gsea_results, gs_oi, fold_change, "FC_x_pct")
patchwork::wrap_plots(plot_list, ncol = 2, widths = c(2,1.5))
group_name = "IFE basal_HS_vs_HD"
We subset the Seurat object and change cell identities to sample type.
subsobj = subset(sobj, cluster_type == "IFE basal")
Seurat::Idents(subsobj) = subsobj$sample_type
table(subsobj$sample_type)
##
## HS HD
## 1480 434
We identify DE genes between HS and HD :
mark = Seurat::FindMarkers(subsobj, ident.1 = "HS", ident.2 = "HD")
mark = mark %>%
dplyr::filter(p_val_adj < 0.05) %>%
dplyr::arrange(-avg_logFC, pct.1 - pct.2)
list_results[[group_name]]$mark = mark
dim(mark)
## [1] 156 5
head(mark, n = 20)
## p_val avg_logFC pct.1 pct.2 p_val_adj
## S100A7 2.410179e-31 1.3566760 0.388 0.088 4.020902e-27
## S100A9 7.080629e-73 1.3078406 0.841 0.366 1.181261e-68
## S100A8 5.506555e-56 1.1196442 0.788 0.371 9.186586e-52
## RPS26 1.089423e-158 1.0419864 0.980 0.963 1.817485e-154
## LGALS7B 4.507541e-27 0.9101773 0.656 0.525 7.519930e-23
## CCL2 1.474907e-35 0.8509353 0.620 0.295 2.460588e-31
## FABP5 2.291460e-12 0.8090332 0.533 0.380 3.822842e-08
## LTF 6.641929e-17 0.7315313 0.186 0.023 1.108073e-12
## MTRNR2L8 4.615073e-43 0.7159748 0.939 0.947 7.699326e-39
## IFI27 2.285749e-19 0.7070176 0.202 0.023 3.813316e-15
## TIMP1 7.070729e-25 0.6009821 0.589 0.364 1.179610e-20
## IFITM3 4.146261e-52 0.5555848 0.922 0.857 6.917207e-48
## CD74 1.999758e-26 0.5376344 0.361 0.101 3.336197e-22
## AKR1B10 8.228382e-44 0.5193093 0.389 0.035 1.372741e-39
## HLA-C 1.422701e-23 0.5147398 0.758 0.578 2.373492e-19
## CXCL14 6.606512e-15 0.4968242 0.889 0.816 1.102164e-10
## MIF 7.372684e-27 0.4964571 0.409 0.168 1.229985e-22
## MTRNR2L10 1.455945e-12 0.4914428 0.619 0.569 2.428953e-08
## MTRNR2L12 6.611841e-25 0.4469115 0.968 0.982 1.103053e-20
## CLCA2 1.199172e-24 0.4257155 0.686 0.523 2.000578e-20
We explore enrichment in gene sets for HS population.
genes_of_interest = mark %>%
dplyr::filter(avg_logFC > 0) %>%
rownames()
enrichr_results = aquarius::run_enrichr(gene_names = genes_of_interest,
gene_corresp = gene_corresp,
gene_sets = gene_sets[, c("gs_name", "ensembl_gene")],
make_plot = TRUE,
plot_title = "Up-regulated in HS compared to HD")
list_results[[group_name]]$enrichr_hs = enrichr_results$ego
enrichr_results$plot +
ggplot2::theme(axis.text.y = element_text(size = 8))
We explore enrichment in gene sets for HD population.
genes_of_interest = mark %>%
dplyr::filter(avg_logFC < 0) %>%
rownames()
enrichr_results = aquarius::run_enrichr(gene_names = genes_of_interest,
gene_corresp = gene_corresp,
gene_sets = gene_sets[, c("gs_name", "ensembl_gene")],
make_plot = TRUE,
plot_title = "Down-regulated in HS compared to HD")
list_results[[group_name]]$enrichr_hd = enrichr_results$ego
enrichr_results$plot +
ggplot2::theme(axis.text.y = element_text(size = 8))
We run a GSEA for all gene sets, from the full count matrix :
ranked_gene_list = aquarius::run_foldchange(Seurat::GetAssayData(subsobj, assay = "RNA", slot = "counts"),
group1 = colnames(subsobj)[subsobj@active.ident %in% "HS"],
group2 = colnames(subsobj)[subsobj@active.ident %in% "HD"])
names(ranked_gene_list) = gene_corresp$ID
gsea_results = aquarius::gsea_run(ranked_gene_list = ranked_gene_list,
gene_sets = gene_sets[, c("gs_name", "ensembl_gene")],
GSEA_p_val_thresh = 1)
list_results[[group_name]]$gsea = gsea_results
gsea_results@result %>%
dplyr::filter(pvalue < 0.05) %>%
dplyr::top_n(., n = 200, wt = abs(NES)) %>%
dplyr::mutate(too_long = ifelse(nchar(ID) > 60, yes = TRUE, no = FALSE)) %>%
dplyr::mutate(ID = stringr::str_sub(ID, end = 60)) %>%
dplyr::mutate(ID = ifelse(too_long, yes = paste0(ID, "..."), no = ID)) %>%
aquarius::gsea_plot(show_legend = TRUE) +
ggplot2::labs(title = "GSEA using all genes (count matrix)") +
ggplot2::theme(plot.title = element_text(size = 20))
We compute a fold change table to make a wordcloud :
fold_change = gene_corresp
colnames(fold_change) = c("gene_name", "ID")
rownames(fold_change) = fold_change$ID
fold_change$FC = ranked_gene_list[rownames(fold_change)]
fold_change$pct.1 = Seurat::GetAssayData(subsobj, assay = "RNA", slot = "counts")[, subsobj@active.ident == "HS"] %>%
apply(., MARGIN = 1, FUN = function(one_row) {
return( mean(one_row != 0) )
})
fold_change$pct.2 = Seurat::GetAssayData(subsobj, assay = "RNA", slot = "counts")[, subsobj@active.ident == "HD"] %>%
apply(., MARGIN = 1, FUN = function(one_row) {
return( mean(one_row != 0) )
})
fold_change$FC_x_pct = ifelse(fold_change$FC > 0,
yes = fold_change$FC * fold_change$pct.1,
no = fold_change$FC * fold_change$pct.2)
dim(fold_change) ; head(fold_change)
## [1] 16683 6
## gene_name ID FC pct.1 pct.2
## ENSG00000238009 AL627309.1 ENSG00000238009 -0.2321825 0.005405405 0.004608295
## ENSG00000237491 AL669831.5 ENSG00000237491 0.7189079 0.083783784 0.048387097
## ENSG00000225880 LINC00115 ENSG00000225880 0.4596952 0.040540541 0.027649770
## ENSG00000230368 FAM41C ENSG00000230368 0.1284072 0.064864865 0.057603687
## ENSG00000230699 AL645608.3 ENSG00000230699 -0.8171450 0.006081081 0.009216590
## ENSG00000187634 SAMD11 ENSG00000187634 -1.8171450 0.002027027 0.006912442
## FC_x_pct
## ENSG00000238009 -0.001069965
## ENSG00000237491 0.060232826
## ENSG00000225880 0.018636293
## ENSG00000230368 0.008329118
## ENSG00000230699 -0.007531290
## ENSG00000187634 -0.012560910
We make the gsea plot for some gene sets :
gs_oi = c("GOBP_RESPONSE_TO_MOLECULE_OF_BACTERIAL_ORIGIN",
"GOBP_HUMORAL_IMMUNE_RESPONSE",
"HALLMARK_APOPTOSIS",
"GOBP_GRANULOCYTE_CHEMOTAXIS",
"GOBP_GRANULOCYTE_MIGRATION",
"HALLMARK_INTERFERON_ALPHA_RESPONSE",
"HALLMARK_INTERFERON_GAMMA_RESPONSE",
"HALLMARK_TNFA_SIGNALING_VIA_NFKB",
"HALLMARK_HYPOXIA",
"GOBP_RESPONSE_TO_TRANSFORMING_GROWTH_FACTOR_BETA")
plot_list = make_gsea_plot(gsea_results, gs_oi, fold_change, "FC_x_pct")
patchwork::wrap_plots(plot_list, ncol = 2, widths = c(2,1.5))
We represent all differentially expressed genes on a heatmap. First, we extract all DE genes :
features_oi = c(mark_to_label$gene_name,
rownames(list_results$ORS_HS_vs_HD$mark),
rownames(list_results$IFE_basal_HS_vs_HD$mark)) %>%
unique()
length(features_oi)
## [1] 155
We prepare the scaled expression matrix :
mat_expression = Seurat::GetAssayData(sobj, assay = "RNA", slot = "data")[features_oi, ]
mat_expression = Matrix::t(mat_expression)
mat_expression = dynutils::scale_quantile(mat_expression) # between 0 and 1
mat_expression = Matrix::t(mat_expression)
mat_expression = as.matrix(mat_expression) # not sparse
dim(mat_expression)
## [1] 155 3416
We prepare the heatmap annotation :
ha_top = ComplexHeatmap::HeatmapAnnotation(
cluster_type = sobj$cluster_type,
sample_type = sobj$sample_type,
cluster = sobj$seurat_clusters,
col = list(cluster_type = color_markers,
sample_type = setNames(nm = c("HS", "HD"),
c("#C55F40", "#2C78E6")),
cluster = setNames(nm = levels(sobj$seurat_clusters),
aquarius::gg_color_hue(length(levels(sobj$seurat_clusters))))))
And the heatmap :
sobj$cell_group = paste0(sobj$cluster_type, sobj$sample_type) %>%
as.factor()
ht = ComplexHeatmap::Heatmap(mat_expression,
col = aquarius::color_cnv,
# Annotation
top_annotation = ha_top,
# Grouping
column_order = sobj@meta.data %>%
dplyr::arrange(cluster_type, sample_type, seurat_clusters) %>%
rownames(),
column_split = sobj$cell_group,
column_gap = unit(c(0.01, 2, 0.01), "mm"),
column_title = NULL,
cluster_rows = TRUE,
cluster_columns = FALSE,
show_column_names = FALSE,
# Visual aspect
show_heatmap_legend = TRUE,
border = TRUE)
ComplexHeatmap::draw(ht,
merge_legend = TRUE,
heatmap_legend_side = "bottom",
annotation_legend_side = "bottom")
We save the list of results :
saveRDS(list_results, file = paste0(out_dir, "/", save_name, "_list_results.rds"))
## R version 3.6.3 (2020-02-29)
## Platform: x86_64-pc-linux-gnu (64-bit)
## Running under: Ubuntu 20.04.6 LTS
##
## Matrix products: default
## BLAS: /usr/local/lib/R/lib/libRblas.so
## LAPACK: /usr/local/lib/R/lib/libRlapack.so
##
## locale:
## [1] C
##
## attached base packages:
## [1] grid stats graphics grDevices utils datasets methods
## [8] base
##
## other attached packages:
## [1] ComplexHeatmap_2.14.0 ggplot2_3.3.5 patchwork_1.1.2
## [4] dplyr_1.0.7
##
## loaded via a namespace (and not attached):
## [1] softImpute_1.4 graphlayouts_0.7.0
## [3] pbapply_1.4-2 lattice_0.20-41
## [5] haven_2.3.1 vctrs_0.3.8
## [7] usethis_2.0.1 dynwrap_1.2.1
## [9] blob_1.2.1 survival_3.2-13
## [11] prodlim_2019.11.13 dynutils_1.0.5
## [13] later_1.3.0 DBI_1.1.1
## [15] R.utils_2.11.0 SingleCellExperiment_1.8.0
## [17] rappdirs_0.3.3 uwot_0.1.8
## [19] dqrng_0.2.1 jpeg_0.1-8.1
## [21] zlibbioc_1.32.0 pspline_1.0-18
## [23] pcaMethods_1.78.0 mvtnorm_1.1-1
## [25] htmlwidgets_1.5.4 GlobalOptions_0.1.2
## [27] future_1.22.1 UpSetR_1.4.0
## [29] laeken_0.5.2 leiden_0.3.3
## [31] clustree_0.4.3 parallel_3.6.3
## [33] scater_1.14.6 irlba_2.3.3
## [35] markdown_1.1 DEoptimR_1.0-9
## [37] tidygraph_1.1.2 Rcpp_1.0.9
## [39] readr_2.0.2 KernSmooth_2.23-17
## [41] carrier_0.1.0 promises_1.1.0
## [43] gdata_2.18.0 DelayedArray_0.12.3
## [45] limma_3.42.2 graph_1.64.0
## [47] RcppParallel_5.1.4 Hmisc_4.4-0
## [49] fs_1.5.2 RSpectra_0.16-0
## [51] fastmatch_1.1-0 ranger_0.12.1
## [53] digest_0.6.25 png_0.1-7
## [55] sctransform_0.2.1 cowplot_1.0.0
## [57] DOSE_3.12.0 here_1.0.1
## [59] TInGa_0.0.0.9000 ggraph_2.0.3
## [61] pkgconfig_2.0.3 GO.db_3.10.0
## [63] DelayedMatrixStats_1.8.0 gower_0.2.1
## [65] ggbeeswarm_0.6.0 iterators_1.0.12
## [67] DropletUtils_1.6.1 reticulate_1.26
## [69] clusterProfiler_3.14.3 SummarizedExperiment_1.16.1
## [71] circlize_0.4.15 beeswarm_0.4.0
## [73] GetoptLong_1.0.5 xfun_0.35
## [75] bslib_0.3.1 zoo_1.8-10
## [77] tidyselect_1.1.0 reshape2_1.4.4
## [79] purrr_0.3.4 ica_1.0-2
## [81] pcaPP_1.9-73 viridisLite_0.3.0
## [83] rtracklayer_1.46.0 rlang_1.0.2
## [85] hexbin_1.28.1 jquerylib_0.1.4
## [87] dyneval_0.9.9 glue_1.4.2
## [89] RColorBrewer_1.1-2 matrixStats_0.56.0
## [91] stringr_1.4.0 lava_1.6.7
## [93] europepmc_0.3 DESeq2_1.26.0
## [95] recipes_0.1.17 labeling_0.3
## [97] httpuv_1.5.2 class_7.3-17
## [99] BiocNeighbors_1.4.2 DO.db_2.9
## [101] annotate_1.64.0 jsonlite_1.7.2
## [103] XVector_0.26.0 bit_4.0.4
## [105] mime_0.9 aquarius_0.1.5
## [107] Rsamtools_2.2.3 gridExtra_2.3
## [109] gplots_3.0.3 stringi_1.4.6
## [111] processx_3.5.2 gsl_2.1-6
## [113] bitops_1.0-6 cli_3.0.1
## [115] batchelor_1.2.4 RSQLite_2.2.0
## [117] randomForest_4.6-14 tidyr_1.1.4
## [119] data.table_1.14.2 rstudioapi_0.13
## [121] org.Mm.eg.db_3.10.0 GenomicAlignments_1.22.1
## [123] nlme_3.1-147 qvalue_2.18.0
## [125] scran_1.14.6 locfit_1.5-9.4
## [127] scDblFinder_1.1.8 listenv_0.8.0
## [129] ggthemes_4.2.4 gridGraphics_0.5-0
## [131] R.oo_1.24.0 dbplyr_1.4.4
## [133] BiocGenerics_0.32.0 TTR_0.24.2
## [135] readxl_1.3.1 lifecycle_1.0.1
## [137] timeDate_3043.102 ggpattern_0.3.1
## [139] munsell_0.5.0 cellranger_1.1.0
## [141] R.methodsS3_1.8.1 proxyC_0.1.5
## [143] visNetwork_2.0.9 caTools_1.18.0
## [145] codetools_0.2-16 ggwordcloud_0.5.0
## [147] Biobase_2.46.0 GenomeInfoDb_1.22.1
## [149] vipor_0.4.5 lmtest_0.9-38
## [151] msigdbr_7.5.1 htmlTable_1.13.3
## [153] triebeard_0.3.0 lsei_1.2-0
## [155] xtable_1.8-4 ROCR_1.0-7
## [157] BiocManager_1.30.10 scatterplot3d_0.3-41
## [159] abind_1.4-5 farver_2.0.3
## [161] parallelly_1.28.1 RANN_2.6.1
## [163] askpass_1.1 GenomicRanges_1.38.0
## [165] RcppAnnoy_0.0.16 tibble_3.1.5
## [167] ggdendro_0.1-20 cluster_2.1.0
## [169] future.apply_1.5.0 Seurat_3.1.5
## [171] dendextend_1.15.1 Matrix_1.3-2
## [173] ellipsis_0.3.2 prettyunits_1.1.1
## [175] lubridate_1.7.9 ggridges_0.5.2
## [177] igraph_1.2.5 RcppEigen_0.3.3.7.0
## [179] fgsea_1.12.0 remotes_2.4.2
## [181] scBFA_1.0.0 destiny_3.0.1
## [183] VIM_6.1.1 testthat_3.1.0
## [185] htmltools_0.5.2 BiocFileCache_1.10.2
## [187] yaml_2.2.1 utf8_1.1.4
## [189] plotly_4.9.2.1 XML_3.99-0.3
## [191] ModelMetrics_1.2.2.2 e1071_1.7-3
## [193] foreign_0.8-76 withr_2.5.0
## [195] fitdistrplus_1.0-14 BiocParallel_1.20.1
## [197] xgboost_1.4.1.1 bit64_4.0.5
## [199] foreach_1.5.0 robustbase_0.93-9
## [201] Biostrings_2.54.0 GOSemSim_2.13.1
## [203] rsvd_1.0.3 memoise_2.0.0
## [205] evaluate_0.18 forcats_0.5.0
## [207] rio_0.5.16 geneplotter_1.64.0
## [209] tzdb_0.1.2 caret_6.0-86
## [211] ps_1.6.0 DiagrammeR_1.0.6.1
## [213] curl_4.3 fdrtool_1.2.15
## [215] fansi_0.4.1 highr_0.8
## [217] urltools_1.7.3 xts_0.12.1
## [219] GSEABase_1.48.0 acepack_1.4.1
## [221] edgeR_3.28.1 checkmate_2.0.0
## [223] scds_1.2.0 cachem_1.0.6
## [225] npsurv_0.4-0 babelgene_22.3
## [227] rjson_0.2.20 openxlsx_4.1.5
## [229] ggrepel_0.9.1 clue_0.3-60
## [231] rprojroot_2.0.2 stabledist_0.7-1
## [233] tools_3.6.3 sass_0.4.0
## [235] nichenetr_1.1.1 magrittr_2.0.1
## [237] RCurl_1.98-1.2 proxy_0.4-24
## [239] car_3.0-11 ape_5.3
## [241] ggplotify_0.0.5 xml2_1.3.2
## [243] httr_1.4.2 assertthat_0.2.1
## [245] rmarkdown_2.18 boot_1.3-25
## [247] globals_0.14.0 R6_2.4.1
## [249] Rhdf5lib_1.8.0 nnet_7.3-14
## [251] RcppHNSW_0.2.0 progress_1.2.2
## [253] genefilter_1.68.0 statmod_1.4.34
## [255] gtools_3.8.2 shape_1.4.6
## [257] HDF5Array_1.14.4 BiocSingular_1.2.2
## [259] rhdf5_2.30.1 splines_3.6.3
## [261] AUCell_1.8.0 carData_3.0-4
## [263] colorspace_1.4-1 generics_0.1.0
## [265] stats4_3.6.3 base64enc_0.1-3
## [267] dynfeature_1.0.0 smoother_1.1
## [269] gridtext_0.1.1 pillar_1.6.3
## [271] tweenr_1.0.1 sp_1.4-1
## [273] ggplot.multistats_1.0.0 rvcheck_0.1.8
## [275] GenomeInfoDbData_1.2.2 plyr_1.8.6
## [277] gtable_0.3.0 zip_2.2.0
## [279] knitr_1.41 latticeExtra_0.6-29
## [281] biomaRt_2.42.1 IRanges_2.20.2
## [283] fastmap_1.1.0 ADGofTest_0.3
## [285] copula_1.0-0 doParallel_1.0.15
## [287] AnnotationDbi_1.48.0 vcd_1.4-8
## [289] babelwhale_1.0.1 openssl_1.4.1
## [291] scales_1.1.1 backports_1.2.1
## [293] S4Vectors_0.24.4 ipred_0.9-12
## [295] enrichplot_1.6.1 hms_1.1.1
## [297] ggforce_0.3.1 Rtsne_0.15
## [299] shiny_1.7.1 numDeriv_2016.8-1.1
## [301] polyclip_1.10-0 lazyeval_0.2.2
## [303] Formula_1.2-3 tsne_0.1-3
## [305] crayon_1.3.4 MASS_7.3-54
## [307] pROC_1.16.2 viridis_0.5.1
## [309] dynparam_1.0.0 rpart_4.1-15
## [311] zinbwave_1.8.0 compiler_3.6.3
## [313] ggtext_0.1.0